package com.xiaozhichao.databafflesys.repository.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 接口管理表
 * </p>
 *
 * @author xiaozhichao
 * @since 2021-03-30
 */
public class BaffleInterface extends Model<BaffleInterface> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 接口名称
     */
    private String name;

    /**
     * 接口code
     */
    private String code;

    /**
     * 命名规则{app_code}/{env_code}/{datasource_code}/{code}
     */
    private String uri;

    /**
     * 说明
     */
    private String note;

    /**
     * 请求报文类型xml json queryString formData
     */
    private String reqType;

    /**
     * 响应报文类型 xml json file
     */
    private String resType;

    /**
     * 应用code
     */
    private String appCode;

    /**
     * 坏境code
     */
    private String envCode;

    /**
     * 数据源code
     */
    private String datasourceCode;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getReqType() {
        return reqType;
    }

    public void setReqType(String reqType) {
        this.reqType = reqType;
    }

    public String getResType() {
        return resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    public String getAppCode() {
        return appCode;
    }

    public void setAppCode(String appCode) {
        this.appCode = appCode;
    }

    public String getEnvCode() {
        return envCode;
    }

    public void setEnvCode(String envCode) {
        this.envCode = envCode;
    }

    public String getDatasourceCode() {
        return datasourceCode;
    }

    public void setDatasourceCode(String datasourceCode) {
        this.datasourceCode = datasourceCode;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "BaffleInterface{" +
        "id=" + id +
        ", name=" + name +
        ", code=" + code +
        ", uri=" + uri +
        ", note=" + note +
        ", reqType=" + reqType +
        ", resType=" + resType +
        ", appCode=" + appCode +
        ", envCode=" + envCode +
        ", datasourceCode=" + datasourceCode +
        "}";
    }
}
